<?php $this->_extends('../_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript">
$(function(){
	$(".datepicker").datepicker({dateFormat:'yy-mm-dd',changeMonth:true});
	$(".audit").click(function(){
		if ( ! confirm("确定审核其他入库单？"))
		{
			return false;
		}
	});
});
</script>
<fieldset><legend>查询条件</legend>
<form method="get">
<? include(Q::ini('custom_system/elements_dir') . 'searchform_element.php');?>
<table class="form_table">
<tr>
	<th>日期：</th>
	<td>
		<input type="text" class="datepicker" name="begin_create_time" value="<?=isset($_GET['begin_create_time'])?$_GET['begin_create_time']:''?>" /> to 
		<input type="text" class="datepicker" name="end_create_time" value="<?=isset($_GET['end_create_time'])?$_GET['end_create_time']:''?>" />
	</td>
</tr>
<tr>
	<th>产品信息：</th>
	<td><input type="text" name="product" value="<?=isset($_GET['product'])?$_GET['product']:''?>" /></td>
</tr>
<tr>
	<th>入库单号</th>
	<td><input type="text" name="number" value="<?=isset($_GET['number'])?$_GET['number']:''?>" /></td>
</tr>
<tr>
	<td></td>
	<td><input type="submit" class="button" value="查询" /></td>
</tr>
</table>
</form></fieldset>

<table width="100%" class="list_table">
<tr>
	<th width="120">单号</th>
	<th width="150">日期</th>
	<th width="100">类别</th>
	<th width="100">经办人</th>
	<th>备注</th>
	<th width="120">状态</th>
	<th width="100">操作</th>
</tr>
<?foreach ($other_io as $i):?>
<tr>
	<td><?=$i['number']?></td>
	<td><?=$i['create_time']?></td>
	<td><?=Helper_BSS_Normal::getIniOne('other_io_type', 'value', $i['type'], 'name')?></td>
	<td><?=$i['user_name']?></td>
	<td align="left"><?=$i['notes']?></td>
	<td>
		<?=Helper_BSS_Normal::getIniOne('other_io_finance_audit', 'value', $i['finance_audit'], 'name')?><br/>
		<?=Helper_BSS_Normal::getIniOne('other_io_storage_audit', 'value', $i['storage_audit'], 'name')?>
	</td>
	<td>
		<?if ($i['storage_audit'] == Q::ini('custom_flag/other_io_storage_audit/audited/value')):?>
		<font color="#aaaaaa">审核 编辑</font>
		<?else:?>
		<a class="audit" href="<?=url('Storage::OtherIo/StorageAudit',array('id'=>$i['id']))?>">审核</a>
		<?if ($i['finance_audit'] == Q::ini('custom_flag/other_io_finance_audit/unaudited/value') && $i['storage_audit'] == Q::ini('custom_flag/other_io_storage_audit/unaudited/value')):?>
		<a href="<?=url('Storage::OtherIo/Edit', array('id'=>$i['id']))?>">编辑</a>
		<?endif;?>
		<?endif;?>
	</td>
</tr>
<?endforeach;?>
</table>
<?=$page?>
<?php $this->_endblock();?>